package com.niiwoo.activity.stage.enums.prize;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 发送红包订单业务类型枚举
 * @Author zq
 * @Date 2018/1/17
 */
@Getter
@AllArgsConstructor
public enum SendPrizeBusinessTypeEnum {

    WITHDRAW_VOUCHER((byte) 0, "提现红包"),
    //GUARANTEE_VOUCHER((byte) 1, "担保代金券","",(byte),""),
    //GUARANTEE_INVESTMENT_VOUCHER((byte) 2, "担保投资代金券","",(byte),""),
    //INVESTMENT_VOUCHER((byte) 3, "投资代金券","",(byte),""),
    CASH_REDPACKET((byte) 4, "现金红包"),
    GUARANTEE_EXPERIENCE((byte) 5, "担保理财金"),
    INVESTMENT_EXPERIENCE((byte) 7, "投资理财金"),
    INVESTMENT_RAISE_INTEREST_RATES((byte) 8, "投资加息券"),
    INVESTMENT_CASHBACK((byte) 9, "投资返现红包"),
    GUARANTEE_CASHBACK((byte) 10, "担保返现红包"),
    LOAN_CASHBACK((byte) 11, "借款返现红包"),
    BORROW_INTEREST_RATE_DISCOUNT((byte) 12, "借款利率折扣卡"),
    ACTIVITY_RAISE_INTEREST((byte)13, "标的加息"),
    FOURTH_FESTIVAL_RAISE_INTEREST((byte)14, "四周年加息"),
    

    // 与红包业务类型不一致的增加间隔，业务类型和红包类型相对应
    RECOMMEND_FOUR_MONTH((byte) 50, "邀请好友4月奖励"),
    RECOMMEND_EIGHT_MONTH((byte) 51, "邀请好友8月奖励");

    private Byte type;

    private String desc;

    public static SendPrizeBusinessTypeEnum getBusinessTypeEnum(Byte type) {
        for (SendPrizeBusinessTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }
}
